package com.qf.config.Pic;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 2019/12/11 0011
 * Administrator
 * 江朝西暮，湖晨南曦
 */
//配置静态资源路径
@Configuration
public class ResourcesConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/pic/**")     // 相对路径
                .addResourceLocations("file:///D:/poor/pic/");    //本地存放的绝对路径
    }
}
